package com.micromap.dataprocessing.domain

import java.time.LocalDate
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.Table

@Entity
@Table(name = "T_AAA_AUTH_PROPERTY_VALUE")
class AuthPropertyValue {

    //"属性值ID"
    @Id
    var propertyValueId: Long? = null
    //"属性ID"
    var propertyId: Long? = null
    //"名称"
    var name: String? = null
    //"值"
    var value: String? = null
    //"父级ID"
    var parentId: Long? = null
    //"0=禁用，1=启用"
    var enabled: Int? = null
    //"排序"
    var orderId: Long? = null
    //"源ID"
    var sourceId: String? = null
    var version: Long? = null
    var crtUserId: String? = null
    var crtUserName: String? = null
    var crtDate: LocalDate? = null
    var mntUserId: String? = null
    var mntUserName: String? = null
    var mntDate: LocalDate? = null
    var extendCode: String? = null

    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as AuthPropertyValue

        if (propertyValueId != other.propertyValueId) return false

        return true
    }

    override fun hashCode(): Int = propertyValueId?.hashCode() ?: 0


}
